const axios = require("axios");

const s = "111";
// var a = () => {

//     console.log(123)
//     let b=123;

//     console.log(b)
// };

// const b =async()=>{

//     let g = await fetch("http://www.173.com")

//     console.log(g)
// }

// setTimeout(()=>{
//     a()

//     b();

// },100)
// async function* hello(){

//     await 1
//     yield 2
//   }

// hello().next().then(x=>console.log(x))
// hello().next().then(x=>console.log(x))
// hello().next().then(x=>console.log(x))
// hello().next().then(x=>console.log(x))
// hello().next().then(x=>console.log(x))
function* __gen() {
	let a = yield "hello";
	// console.log(`a:${a}`)
	let b = yield "world";
	//  console.log(`b:${b}`)

	yield "aaa";
}

console.log([...__gen()]);
// let g = __gen()
// console.log(g.next(1))
// console.log(g.next(2))
// console.log(g.next(3))
// console.log(Symbol.iterator)

var obj = { a: 1, b: 2 };
obj[Symbol.iterator] = function* () {
	for (var i = 0; i < 10; i++) {
		yield i;
	}
};
//console.log(...obj)
// for(var prop of obj){

//     console.log(prop)
// }

function pro() {
	return new Promise((resolve, reject) => {
		setTimeout(() => {
			resolve(999);
		}, 100);
	});
}
// const ax=new axios.Axios();

async function* agf() {
	await pro();
	yield 2;
	yield 3;
}

const _agf = agf();

_agf.next().then(x => {
	console.log(x);
});
_agf.next().then(x => {
	console.log(x);
});
_agf.next().then(x => {
	console.log(x);
});

//axios.get("https://randomuser.me/api/?results=1")

// console.log(axios.get())
const a = 101;
let url = "https://randomuser.me/api/?results=1";
const b = 100;
console.dir(a);

console.table(b);

let budget = 1_000_000_000_000;
